<script type="text/javascript">
    function TyxxcjManagerCtrl($scope, $http, modalService, CtrlUtil, $element, UploadService) {
        var ctrl = this
        CtrlUtil.build(ctrl, ':root/tyxxcj/list')
        this.query = function () {
            ctrl.entities && (ctrl.entities.content = {})
            $http.post(':root/tyxxcj/list').success(function (r) {
                ctrl.entities = r;
            })
        }
        this.del = function (item) {
            modalService.confirm({
                content: '删除会删除团员信息采集且无法恢复，确定要删除申报记录吗?',
                result: item
            }).then(function (r) {
                $http.post(':root/tyxxcj/delTyxxcjzb', r).success(function (R) {
                    modalService.succ('删除成功', 1500)
                    ctrl.query();
                })
            })

        }
    }

</script>
<div ng-controller="TyxxcjManagerCtrl as ctrl" ng-init="ctrl.query()">

    <!-- operation area -->
    <a type="button" class="btn btn-cys btn-sm" ng-click="mainCtrl.toApply()">
        <span class="glyphicon glyphicon-plus"></span>
        申报
    </a>
    <div class="pull-right" ng-include="':root/components/page.html'"></div>
    <!-- operation area END -->
    <!-- data grid area -->
    <div style="padding-top: 10px;">
        <table class="table table-bordered table-hover table-striped">
            <tr>
                <!--<th>-->
                <!--<input ng-change="ctrl.checkAll(ctrl.$checkAll)" ng-model="ctrl.$checkAll" type="checkbox"/>-->
                <!--</th>-->
                <th>院系</th>
                <th>支部</th>
                <th>填报人</th>
                <th>填报日期</th>
                <th>审核状态</th>
                <th>操作</th>
            </tr>
            <tr ng-repeat="item in ctrl.entities.content">
                <!--<td><input ng-model="item.$checked" type="checkbox"/></td>-->
                <td>{{item.yx.name}}</td>
                <td>{{item.zbmc.mc}}</td>
                <td>{{item.sbr}}</td>
                <td>{{item.sbrq}}</td>
                <td>{{item.shzt.mc}}</td>
                <td>
                    <a ng-if="item.shzt.dm == 10" href="javascript:;" ng-click="mainCtrl.toApply(item,false)">编辑</a>
                    <a ng-if="item.shzt.dm == 10" href="javascript:;" ng-click="ctrl.del(item)">删除</a>
                    <a ng-if="item.shzt.dm != 10" href="javascript:;" ng-click="mainCtrl.toApply(item,true)">查看</a>
                </td>
            </tr>
        </table>
        <p>
            共有记录：
            <span>{{ctrl.entities.totalElements}}</span> 条
        </p>
    </div>
</div>